/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package web;

import ejb.TiendaliaOrderBeanLocal;
import entities.TiendaliaOrder;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;

/**
 *
 * @author Jesus
 */
@ManagedBean
public class AdmOrdersBean {

    @EJB
    private TiendaliaOrderBeanLocal orderBean;
    private List<TiendaliaOrder> orders;

    public AdmOrdersBean() {
        orders = new ArrayList<TiendaliaOrder>();
    }

    @PostConstruct
    public void init() {
        orders = orderBean.findAll();
    }

    public List<TiendaliaOrder> getOrders() {
        return orders;
    }

    public void setOrders(List<TiendaliaOrder> orders) {
        this.orders = orders;
    }
}
